﻿using HRX.PayCenter.ApplicationCore.Interfaces;
using HRX.PayCenter.ApplicationCore.Interfaces.Common;
using System;

namespace HRX.PayCenter.ApplicationCore.Entities
{
    /// <summary>
    ///alipay支付订单
    /// </summary>
    public class AlipayOrderEntity : BaseEntity, IDeviceId, IDiviseRate, ICarOwner, IRefundFee,
        IAlipayTrade,
        IRefundTime, IDiviseTime, IPayTime, ICloseTime,
        IAggregateRoot
    {
        /// <summary>
        /// 设备id
        /// </summary>
        public string DeviceId { get; set; }
        /// <summary>
        /// 分账比例 
        /// 比如：7:2:1 解析过程 总公司:子公司:投资人
        /// 如果没有分红，则占位“0”，后续扩展往后加，关系比是固定的，且总和必须是10
        /// </summary>
        public string DiviseRate { get; set; }
        /// <summary>
        /// 总公司Id
        /// </summary>
        public int HeadCompanyId { get; set; }
        /// <summary>
        /// 总公司支付宝Id
        /// </summary>
        public string HeadCompanyAlipayId { get; set; }
        /// <summary>
        /// 总公司账户金额
        /// </summary>
        public decimal HeadCompanyAmount { get; set; }
        /// <summary>
        /// 子公司Id
        /// </summary>
        public int CompanyId { get; set; }
        /// <summary>
        /// 子公司支付宝Id
        /// </summary>
        public string CompanyAlipayId { get; set; }
        /// <summary>
        /// 子公司账户金额
        /// </summary>
        public decimal CompanyAmount { get; set; }
        /// <summary>
        /// 投资人Id
        /// </summary>
        public int InvestorId { get; set; }
        /// <summary>
        /// 投资人支付宝Id
        /// </summary>
        public string InvestorAlipayId { get; set; }
        /// <summary>
        /// 投资人分账金额
        /// </summary>
        public decimal InvestorAmount { get; set; }
        /// <summary>
        /// 车主名称
        /// </summary>
        public string CarOwerId { get ; set ; }
        /// <summary>
        /// 车主手机号
        /// </summary>
        public string CarTel { get ; set ; }
        /// <summary>
        /// 支付人支付宝Id
        /// </summary>
        public string PayerAlipayId { get; set; }
        /// <summary>
        /// 车牌号
        /// </summary>
        public string Licenseplate { get; set; }
        /// <summary>
        /// 退款时间
        /// </summary>
        public DateTime RefundTime { get ; set ; }
        /// <summary>
        /// 分账时间
        /// </summary>
        public DateTime DiviseTime { get ; set ; }
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime PayTime { get ; set ; }
        /// <summary>
        /// 交易关闭时间
        /// </summary>
        public DateTime CloseTime { get; set; }
        /// <summary>
        /// 退款金额
        /// </summary>
        public decimal RefundFee { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string AlipayTradeStatus { get ; set ; }
        /// <summary>
        /// 
        /// </summary>
        public string PayTradeNo { get ; set ; }
        /// <summary>
        /// 产品Id
        /// </summary>
        public int ProductId { get; set; }

        public DateTime DeviceStartTime { get; set; }

        public DateTime DeviceCompleteTime { get; set; }
    }
}
